package org.ee.core.constant;

/**
 * 通用状态码
 * @Author jokr
 * @Date 2025/8/18 下午3:39
 */
public enum ResultCode {
    SUCCESS(200,"success"),
    FAILURE(500,"failure"),
    VALIDATE_FAILED(400,"validateFailed"),
    UNAUTHORIZED(401,"unauthorized"),
    FORBIDDEN(403,"forbidden"),
    NOT_FOUND(404,"notFound"),;

    private final int code;
    private final String message;

    ResultCode(int code, String message) {
        this.code = code;
        this.message = message;
    }

    public int getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }
}
